<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="ExtLib.Hashtbl.html">
<link rel="Up" href="ExtLib.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtLib" rel="Chapter" href="ExtLib.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><link title="Enumerations" rel="Section" href="#6_Enumerations">
<link title="Old functions" rel="Section" href="#6_Oldfunctions">
<title>ExtLib.Array</title>
</head>
<body>
<div class="navbar"><a class="pre" href="ExtLib.Hashtbl.html" title="ExtLib.Hashtbl">Previous</a>
&nbsp;<a class="up" href="ExtLib.html" title="ExtLib">Up</a>
&nbsp;</div>
<h1>Module <a href="type_ExtLib.Array.html">ExtLib.Array</a></h1>
<pre><span class="keyword">module</span> Array: <code class="type"><a href="ExtArray.Array.html">ExtArray.Array</a></code></pre><hr width="100%">
<pre><span id="VALrev"><span class="keyword">val</span> rev</span> : <code class="type">'a array -> 'a array</code></pre><div class="info">
<h6 id="6_Newfunctions">New functions</h6>
<p>
Array reversal.<br>
</div>
<pre><span id="VALrev_in_place"><span class="keyword">val</span> rev_in_place</span> : <code class="type">'a array -> unit</code></pre><div class="info">
In-place array reversal.  The array argument is updated.<br>
</div>
<pre><span id="VALiter2"><span class="keyword">val</span> iter2</span> : <code class="type">('a -> 'b -> unit) -> 'a array -> 'b array -> unit</code></pre><div class="info">
<code class="code">Array.iter2 f [|a1; ...; an|] [|b1; ...; bn|]</code> performs
    calls <code class="code">f a1 b1; ...; f an bn</code> in that order.<br>
<b>Raises</b> <code>Invalid_argument</code> if the length of <code class="code">a1</code> does not equal the
    length of <code class="code">a2</code>.<br>
</div>
<pre><span id="VALmap2"><span class="keyword">val</span> map2</span> : <code class="type">('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array</code></pre><div class="info">
<code class="code">Array.map2 f [|a1; ...; an|] [|b1; ...; bn|]</code> creates new array
    <code class="code">[|f a1 b1; ...; f an bn|]</code>.<br>
<b>Raises</b> <code>Invalid_argument</code> if the length of <code class="code">a1</code> does not equal the
    length of <code class="code">a2</code>.<br>
</div>
<pre><span id="VALfor_all"><span class="keyword">val</span> for_all</span> : <code class="type">('a -> bool) -> 'a array -> bool</code></pre><div class="info">
<code class="code">for_all p [a1; ...; an]</code> checks if all elements of the array
	satisfy the predicate <code class="code">p</code>.  That is, it returns
	<code class="code"> (p a1) &amp;&amp; (p a2) &amp;&amp; ... &amp;&amp; (p an)</code>.<br>
</div>
<pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type">('a -> bool) -> 'a array -> bool</code></pre><div class="info">
<code class="code">exists p [a1; ...; an]</code> checks if at least one element of
	the array satisfies the predicate <code class="code">p</code>.  That is, it returns
	<code class="code"> (p a1) || (p a2) || ... || (p an)</code>.<br>
</div>
<pre><span id="VALmem"><span class="keyword">val</span> mem</span> : <code class="type">'a -> 'a array -> bool</code></pre><div class="info">
<code class="code">mem m a</code> is true if and only if <code class="code">m</code> is equal to an element of <code class="code">a</code>.<br>
</div>
<pre><span id="VALmemq"><span class="keyword">val</span> memq</span> : <code class="type">'a -> 'a array -> bool</code></pre><div class="info">
Same as <a href="ExtArray.Array.html#VALmem"><code class="code">ExtArray.Array.mem</code></a> but uses physical equality instead of
	structural equality to compare array elements.<br>
</div>
<pre><span id="VALfind"><span class="keyword">val</span> find</span> : <code class="type">('a -> bool) -> 'a array -> 'a</code></pre><div class="info">
<code class="code">find p a</code> returns the first element of array <code class="code">a</code>
	that satisfies the predicate <code class="code">p</code>.
	Raise <code class="code">Not_found</code> if there is no value that satisfies <code class="code">p</code> in the
	array <code class="code">a</code>.<br>
</div>
<pre><span id="VALfindi"><span class="keyword">val</span> findi</span> : <code class="type">('a -> bool) -> 'a array -> int</code></pre><div class="info">
<code class="code">findi p a</code> returns the index of the first element of array <code class="code">a</code>
	that satisfies the predicate <code class="code">p</code>.
	Raise <code class="code">Not_found</code> if there is no value that satisfies <code class="code">p</code> in the
	array <code class="code">a</code>.<br>
</div>
<pre><span id="VALfilter"><span class="keyword">val</span> filter</span> : <code class="type">('a -> bool) -> 'a array -> 'a array</code></pre><div class="info">
<code class="code">filter p a</code> returns all the elements of the array <code class="code">a</code>
	that satisfy the predicate <code class="code">p</code>.  The order of the elements
	in the input array is preserved.<br>
</div>
<pre><span id="VALfind_all"><span class="keyword">val</span> find_all</span> : <code class="type">('a -> bool) -> 'a array -> 'a array</code></pre><div class="info">
<code class="code">find_all</code> is another name for <a href="ExtArray.Array.html#VALfilter"><code class="code">ExtArray.Array.filter</code></a>.<br>
</div>
<pre><span id="VALpartition"><span class="keyword">val</span> partition</span> : <code class="type">('a -> bool) -> 'a array -> 'a array * 'a array</code></pre><div class="info">
<code class="code">partition p a</code> returns a pair of arrays <code class="code">(a1, a2)</code>, where
	<code class="code">a1</code> is the array of all the elements of <code class="code">a</code> that
	satisfy the predicate <code class="code">p</code>, and <code class="code">a2</code> is the array of all the
	elements of <code class="code">a</code> that do not satisfy <code class="code">p</code>.
	The order of the elements in the input array is preserved.<br>
</div>
<br>
<h6 id="6_Enumerations">Enumerations</h6><br>
<pre><span id="VALenum"><span class="keyword">val</span> enum</span> : <code class="type">'a array -> 'a <a href="Enum.html#TYPEt">Enum.t</a></code></pre><div class="info">
Returns an enumeration of the elements of an array.<br>
</div>
<pre><span id="VALof_enum"><span class="keyword">val</span> of_enum</span> : <code class="type">'a <a href="Enum.html#TYPEt">Enum.t</a> -> 'a array</code></pre><div class="info">
Build an array from an enumeration.<br>
</div>
<br>
<h6 id="6_Oldfunctions">Old functions</h6><br>
<br>
These functions are already part of the Ocaml standard library
      and have not been modified. Please refer to the Ocaml Manual for
      documentation.<br>
<pre><span id="VALlength"><span class="keyword">val</span> length</span> : <code class="type">'a array -> int</code></pre><pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type">'a array -> int -> 'a</code></pre><pre><span id="VALset"><span class="keyword">val</span> set</span> : <code class="type">'a array -> int -> 'a -> unit</code></pre><pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">int -> 'a -> 'a array</code></pre><pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type">int -> 'a -> 'a array</code></pre><pre><span id="VALinit"><span class="keyword">val</span> init</span> : <code class="type">int -> (int -> 'a) -> 'a array</code></pre><pre><span id="VALmake_matrix"><span class="keyword">val</span> make_matrix</span> : <code class="type">int -> int -> 'a -> 'a array array</code></pre><pre><span id="VALcreate_matrix"><span class="keyword">val</span> create_matrix</span> : <code class="type">int -> int -> 'a -> 'a array array</code></pre><pre><span id="VALappend"><span class="keyword">val</span> append</span> : <code class="type">'a array -> 'a array -> 'a array</code></pre><pre><span id="VALconcat"><span class="keyword">val</span> concat</span> : <code class="type">'a array list -> 'a array</code></pre><pre><span id="VALsub"><span class="keyword">val</span> sub</span> : <code class="type">'a array -> int -> int -> 'a array</code></pre><pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type">'a array -> 'a array</code></pre><pre><span id="VALfill"><span class="keyword">val</span> fill</span> : <code class="type">'a array -> int -> int -> 'a -> unit</code></pre><pre><span id="VALblit"><span class="keyword">val</span> blit</span> : <code class="type">'a array -> int -> 'a array -> int -> int -> unit</code></pre><pre><span id="VALto_list"><span class="keyword">val</span> to_list</span> : <code class="type">'a array -> 'a list</code></pre><pre><span id="VALof_list"><span class="keyword">val</span> of_list</span> : <code class="type">'a list -> 'a array</code></pre><pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">('a -> unit) -> 'a array -> unit</code></pre><pre><span id="VALmap"><span class="keyword">val</span> map</span> : <code class="type">('a -> 'b) -> 'a array -> 'b array</code></pre><pre><span id="VALiteri"><span class="keyword">val</span> iteri</span> : <code class="type">(int -> 'a -> unit) -> 'a array -> unit</code></pre><pre><span id="VALmapi"><span class="keyword">val</span> mapi</span> : <code class="type">(int -> 'a -> 'b) -> 'a array -> 'b array</code></pre><pre><span id="VALfold_left"><span class="keyword">val</span> fold_left</span> : <code class="type">('a -> 'b -> 'a) -> 'a -> 'b array -> 'a</code></pre><pre><span id="VALfold_right"><span class="keyword">val</span> fold_right</span> : <code class="type">('b -> 'a -> 'a) -> 'b array -> 'a -> 'a</code></pre><pre><span id="VALsort"><span class="keyword">val</span> sort</span> : <code class="type">('a -> 'a -> int) -> 'a array -> unit</code></pre><pre><span id="VALstable_sort"><span class="keyword">val</span> stable_sort</span> : <code class="type">('a -> 'a -> int) -> 'a array -> unit</code></pre><pre><span id="VALfast_sort"><span class="keyword">val</span> fast_sort</span> : <code class="type">('a -> 'a -> int) -> 'a array -> unit</code></pre><pre><span id="VALunsafe_get"><span class="keyword">val</span> unsafe_get</span> : <code class="type">'a array -> int -> 'a</code></pre><pre><span id="VALunsafe_set"><span class="keyword">val</span> unsafe_set</span> : <code class="type">'a array -> int -> 'a -> unit</code></pre></body></html>